package com.erp.erp_mask.mapper;

import com.erp.erp_mask.pojo.TRolePermissions;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
* @author yang
* @description 针对表【t_role_permissions】的数据库操作Mapper
* @createDate 2024-05-13 14:57:47
* @Entity com.erp.erp_mask.pojo.TRolePermissions
*/
public interface TRolePermissionsMapper extends BaseMapper<TRolePermissions> {
   @Delete("delete from t_role_permissions where role_ID=#{roleid};")
    void deleteByRoleId(Long roleid);

   @Select("insert into t_role_permissions (role_ID, permission_ID) values(#{roleId},#{permId})")
   void add(@Param("roleId") Long roleId,@Param("permId") Long permId);
   @Select("delete from t_role_permissions where permission_ID=#{perid};")
   void deleteByPermissionId(Long perid);
}




